package com.openspring.platform.controller;

import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.openspring.framework.common.Paging;
import com.openspring.framework.controller.GenericController;
import com.openspring.platform.model.LoginLog;
import com.openspring.platform.service.LoginLogService;

@Controller
@RequestMapping("loginLog")
public class LoginLogController extends GenericController<LoginLog, Long>{

	//private LoginLogService loginLogService;

	@Resource(name="loginLogService")
	public void setLoginLogService(LoginLogService loginLogService) {
		//this.loginLogService = loginLogService;
		super.setGenericService(loginLogService);
	}
	
	@RequestMapping(value="/list", method=RequestMethod.GET)
	@ResponseBody
	public Map<String, Object> list(
			@ModelAttribute Paging paging,
			@RequestParam(value="filter", required=false) String filter,
			@RequestParam(value="sort", required=false) String sort) {
		
		return this.doQuery(paging, filter, sort);
	}
}